﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PelitaProduksi.Controller
{
    class DateController
    {
        /* Singleton */
        private static DateController _instance;
        private DateController()
        {
        }
        public static DateController Instance
        {
            get
            {
                if (_instance == null) _instance = new DateController();
                return _instance;
            }
        }
        /* End of Singleton */
        public string getDate(DateTime date)
        {
            return string.Format("{0:yyyy}-{0:MM}-{0:dd}", date);
        }
        public string getTime(DateTime date)
        {
            return string.Format("{0:HH}:{0:mm}:{0:ss}", date);
        }
    }
}
